import http from '../../http';

interface ILoginParams {
  userName: string;
  password: string | number;
}

interface ILoginApi {
  login: (params: ILoginParams) => Promise<any>;
  login2: (params: ILoginParams) => Promise<any>;
}

const loginApi: ILoginApi = {
  login(params) {
    return http.post('', params, {});
  },
  login2(params) {
    return http.get('', params, {});
  },
};

export default loginApi;
